package day01am;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

/**
 * @author JokerQ
 * @date 2020/8/22 - 22:59
 */
public class URLDEDemo {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String str1 = "%E9%82%B1%E6%96%87%E6%96%8C";
        String key = URLDecoder.decode(str1, "UTF-8");
        System.out.println(key);
        String str2 = "山东青岛";
        String encode = URLEncoder.encode(str2, "UTF-8");
        System.out.println(encode);
    }
}
